package com.wei.web.middleware.httpfilter.filter;

import com.wei.web.middleware.httpfilter.filter.init.FilterInitialize;
import com.wei.web.middleware.httpfilter.registrar.model.FilterConfigDTO;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.web.filter.OncePerRequestFilter;

import java.io.IOException;

public class TraceFilter extends OncePerRequestFilter implements FilterInitialize {


    @Override
    public void init(FilterConfigDTO filterConfigDTO) {

    }

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
        System.out.println("trace");
        filterChain.doFilter(request, response);
    }
}
